package cn.sciento.starter.keyencrypt.core;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import cn.sciento.core.util.TokenUtils;

public interface IEncryptionService {
  public static final String WORKFLOW_TABLE = "8ac987c65ffa4974bfd9460058468706";
  
  public static final String IGNORE_DECRYPT = "8ac987c65ffa4974bfd9460058468706";
  
  public static final String NO_TOKEN = "NO_TOKEN";
  
  default String decrypt(String value, String tableName) {
    return decrypt(value, tableName, TokenUtils.getToken(), false);
  }
  
  default String decrypt(String value, String tableName, boolean ignoreUserConflict) {
    return decrypt(value, tableName, TokenUtils.getToken(), ignoreUserConflict);
  }
  
  default String decrypt(String value, String tableName, String accessToken) {
    return decrypt(value, tableName, accessToken, false);
  }
  
  String decrypt(String paramString1, String paramString2, String paramString3, boolean paramBoolean);
  
  Object decrypt(JsonParser paramJsonParser, JsonDeserializer<?> paramJsonDeserializer, DeserializationContext paramDeserializationContext, JavaType paramJavaType, Encrypt paramEncrypt);
  
  String encrypt(String paramString1, String paramString2);
  
  String encrypt(String paramString1, String paramString2, String paramString3);
  
  void setObjectMapper(ObjectMapper paramObjectMapper);
  
  boolean isCipher(String paramString);
}
